package gov.jyy.operationlog.core;


import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 操作日志
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface OperationLog {

    /**
     * 操作内容
     */
    String value() default "";

    /**
     * 操作内容
     */
    Class<? extends LogContentInterface> content() default DefaultLogContentInterface.class;

    /**
     * 操作类型
     */
    OperationType type() default OperationType.DEFAULT;

    class DefaultLogContentInterface implements LogContentInterface {
        @Override
        public String getLogContent(Object[] args) {
            return null;
        }

        @Override
        public String getSxsqJbxxId(Object[] args) {
            return null;
        }

        @Override
        public String getUserId(Object[] args) {
            return null;
        }
    }
}
